package com.chengyu.core.controller.services;

import com.chengyu.core.controller.ShopBaseController;
import com.chengyu.core.domain.result.ServicesCateResult;
import com.chengyu.core.entity.CommonResult;
import com.chengyu.core.exception.ServiceException;
import com.chengyu.core.service.services.ServicesCateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

/**
 * @title  服务分类
 * @author wenlj
 * @date   2023/10/03
 */
@Api(tags = "服务分类")
@Controller
@RequestMapping("/member")
public class ServicesCateController extends ShopBaseController {
	
	@Autowired
	private ServicesCateService servicesCateService;
	
	@ApiOperation(value = "服务分类列表")
	@ResponseBody
	@RequestMapping(value="/servicesCate/getList", method=RequestMethod.GET)
	public CommonResult<List<ServicesCateResult>> getList(Integer status) throws ServiceException {
		List<ServicesCateResult> list = servicesCateService.getServicesCateResults(status);
		return CommonResult.success(list);
	}

}